#!/usr/bin/php
<?
set_include_path("../include");
require("header.inc.php");

if (empty($argv[1])) {
	die("Usage: $argv[0] " . '$libraryID [$newShardID]' . "\n");
}

$libraryID = $argv[1];
$shardID = $argv[2] ?? Zotero_Shards::getNextShard();

echo "Moving library $libraryID to shard $shardID\n";
Zotero_Shards::moveLibrary($libraryID, $shardID);
